// Type: System.Web.UI.WebControls.DataList
// Assembly: System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// Assembly location: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll

using System;
using System.ComponentModel;
using System.Runtime;
using System.Web.UI;

namespace System.Web.UI.WebControls
{
    [Editor(
        "System.Web.UI.Design.WebControls.DataListComponentEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        , typeof (ComponentEditor))]
    [Designer(
        "System.Web.UI.Design.WebControls.DataListDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        )]
    [ControlValueProperty("SelectedValue")]
    public class DataList : BaseDataList, INamingContainer, IRepeatInfoUser, IWizardSideBarListControl
    {
        public const string SelectCommandName = "Select";
        public const string EditCommandName = "Edit";
        public const string UpdateCommandName = "Update";
        public const string CancelCommandName = "Cancel";
        public const string DeleteCommandName = "Delete";
        public DataList();

        [PersistenceMode(PersistenceMode.InnerProperty)]
        [NotifyParentProperty(true)]
        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public virtual TableItemStyle AlternatingItemStyle { get; }

        [TemplateContainer(typeof (DataListItem))]
        [Browsable(false)]
        [DefaultValue(null)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public virtual ITemplate AlternatingItemTemplate { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        set; }

        [DefaultValue(-1)]
        public virtual int EditItemIndex { get; set; }

        [PersistenceMode(PersistenceMode.InnerProperty)]
        [NotifyParentProperty(true)]
        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public virtual TableItemStyle EditItemStyle { get; }

        [TemplateContainer(typeof (DataListItem))]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [Browsable(false)]
        [DefaultValue(null)]
        public virtual ITemplate EditItemTemplate { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        set; }

        [DefaultValue(false)]
        public virtual bool ExtractTemplateRows { get; set; }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [DefaultValue(null)]
        [NotifyParentProperty(true)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public virtual TableItemStyle FooterStyle { get; }

        [Browsable(false)]
        [DefaultValue(null)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [TemplateContainer(typeof (DataListItem))]
        public virtual ITemplate FooterTemplate { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        set; }

        [DefaultValue(0)]
        public override GridLines GridLines { get; set; }

        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [NotifyParentProperty(true)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public virtual TableItemStyle HeaderStyle { get; }

        [Browsable(false)]
        [TemplateContainer(typeof (DataListItem))]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        public virtual ITemplate HeaderTemplate { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        set; }

        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual DataListItemCollection Items { get; }

        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [NotifyParentProperty(true)]
        public virtual TableItemStyle ItemStyle { get; }

        [DefaultValue(0)]
        public virtual int RepeatColumns { get; set; }

        [DefaultValue(1)]
        public virtual RepeatDirection RepeatDirection { get; set; }

        [DefaultValue(0)]
        public virtual RepeatLayout RepeatLayout { get; set; }

        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual DataListItem SelectedItem { get; }

        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [NotifyParentProperty(true)]
        public virtual TableItemStyle SelectedItemStyle { get; }

        [Browsable(false)]
        [DefaultValue(null)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [TemplateContainer(typeof (DataListItem))]
        public virtual ITemplate SelectedItemTemplate { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        set; }

        [Browsable(false)]
        public object SelectedValue { get; }

        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [NotifyParentProperty(true)]
        public virtual TableItemStyle SeparatorStyle { get; }

        [Browsable(false)]
        [DefaultValue(null)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [TemplateContainer(typeof (DataListItem))]
        public virtual ITemplate SeparatorTemplate { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        set; }

        [DefaultValue(true)]
        public virtual bool ShowFooter { get; set; }

        [DefaultValue(true)]
        public virtual bool ShowHeader { get; set; }

        protected override HtmlTextWriterTag TagKey { get; }

        #region IRepeatInfoUser Members

        Style IRepeatInfoUser.GetItemStyle(ListItemType itemType, int repeatIndex);

        void IRepeatInfoUser.RenderItem(ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo,
                                        HtmlTextWriter writer);

        bool IRepeatInfoUser.HasFooter { get; }
        bool IRepeatInfoUser.HasHeader { get; }
        bool IRepeatInfoUser.HasSeparators { get; }
        int IRepeatInfoUser.RepeatedItemCount { get; }

        #endregion

        #region IWizardSideBarListControl Members

        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        [Browsable(false)]
        [TemplateContainer(typeof (DataListItem))]
        public virtual ITemplate ItemTemplate { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        set; }

        [Bindable(true)]
        [DefaultValue(-1)]
        public virtual int SelectedIndex { get; set; }

        #endregion

        protected override void CreateControlHierarchy(bool useDataSource);
        protected override Style CreateControlStyle();
        protected virtual DataListItem CreateItem(int itemIndex, ListItemType itemType);
        protected virtual void InitializeItem(DataListItem item);
        protected override void LoadViewState(object savedState);
        protected override bool OnBubbleEvent(object source, EventArgs e);
        protected virtual void OnCancelCommand(DataListCommandEventArgs e);
        protected virtual void OnDeleteCommand(DataListCommandEventArgs e);
        protected virtual void OnEditCommand(DataListCommandEventArgs e);
        protected internal override void OnInit(EventArgs e);
        protected virtual void OnItemCommand(DataListCommandEventArgs e);
        protected virtual void OnItemCreated(DataListItemEventArgs e);
        protected virtual void OnItemDataBound(DataListItemEventArgs e);
        protected virtual void OnUpdateCommand(DataListCommandEventArgs e);
        protected internal override void PrepareControlHierarchy();
        protected internal override void RenderContents(HtmlTextWriter writer);
        protected override object SaveViewState();
        protected override void TrackViewState();

        public event DataListCommandEventHandler CancelCommand;
        public event DataListCommandEventHandler DeleteCommand;
        public event DataListCommandEventHandler EditCommand;
        public event DataListCommandEventHandler ItemCommand;
        public event DataListItemEventHandler ItemCreated;
        public event DataListItemEventHandler ItemDataBound;
        public event DataListCommandEventHandler UpdateCommand;
    }
}
